﻿<Window x:Class="TSSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:TSSample.ViewModel"

        xmlns:ts="clr-namespace:MVVMTemplateSelection;assembly=MVVMTemplateSelection"

        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <ts:ComposedDataTemplateSelector x:Key="ts"></ts:ComposedDataTemplateSelector>

        <ts:ConventionTemplateSelector x:Key="tsconvention"></ts:ConventionTemplateSelector>
        <ts:ViewAttibuteBasedTemplateSelector x:Key="tsreflection"></ts:ViewAttibuteBasedTemplateSelector>
        <ts:ViewModelAttributeBasedTemplateSelector x:Key="tsreflection2"></ts:ViewModelAttributeBasedTemplateSelector>
    </Window.Resources>
    <StackPanel>


        <ContentControl ContentTemplateSelector="{StaticResource tsconvention}"
                        Content="{Binding Source={StaticResource Locator}, Path=Main}">
        </ContentControl>
        <ContentControl ContentTemplateSelector="{StaticResource tsreflection}"
                        Content="{Binding Source={StaticResource Locator}, Path=Main}">
        </ContentControl>
        <ContentControl ContentTemplateSelector="{StaticResource tsreflection2}"
                        Content="{Binding Source={StaticResource Locator}, Path=Main}">
        </ContentControl>

    </StackPanel>
</Window>